memory allocation for structures in C